@echo off
cd /d "%~dp0"
chcp 65001

echo 检查 ws 模块是否已安装...
call npm list ws >nul 2>&1
if errorlevel 1 (
    echo 正在安装 ws 模块...
    call npm install ws
) else (
    echo ws 模块已安装
)

echo.
echo 发送WebSocket命令...
node src/send-commands.js

echo.
echo 按任意键退出...
pause >nul 